# -*- coding: utf-8 -*-


import json

x = '{"A":"a", "B": "b"}'

y = '[1,2,3,4]'

print(json.dumps(x))  # 将python数据转化为json字符串

print(json.loads(x))  # 将json字符串转变为python数据类型
print(type(json.loads(x)))


print(json.loads(y))
print(type(json.loads(y)))
